<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

<div id="app">
    <h1>{{title}}</h1>
    <h3>${token}</h3>
    <button @click="makeorder">下单</button>
</div>

<script src="/js/vue.min.js"></script>
<script src="/js/axios.min.js"></script>
<script>
    var vue = new Vue({
        el:"#app",
        data:{
            title:"分布式锁和幂等性问题",
            token:"${token}"
        },
        methods:{
          makeorder:function(){
               axios.post("/api/v1/saveorder",{userId:1,productId:1,token:this.token}).then(function(res){
                   //window.location.href = "/order/index";
               })
          }
        }
    });

</script>
</body>
</html>